package edu.sias.hyzn.mapper;

import edu.sias.hyzn.domain.Medicine;
import edu.sias.hyzn.domain.MedicineRecord;
import edu.sias.hyzn.vo.MedicineRecordPie;
import edu.sias.hyzn.vo.MedicineRecordVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MedicineMapper {
    public Medicine selectMedicineById(Long id);
    public int insertMedicine(Medicine medicine);
    public int updateMedicine(Medicine medicine);
    public int deleteMedicineById(Long id);
    public int deleteMedicineByIds(Long[] ids);

    public MedicineRecord selectMedicineRecordById(Long id);
    public int insertMedicineRecord(MedicineRecord medicineRecord);
    public int updateMedicineRecord(MedicineRecord medicineRecord);
    public int deleteMedicineRecordById(Long id);
    public int deleteMedicineRecordByIds(Long[] ids);

    List<Medicine> selectMedicineList(Medicine medicine);

    List<MedicineRecordVO> selectMedicineRecordVOList(Long userId);

    List<MedicineRecordPie> selectMedicineRecordGroupByMedicine(Long userId);
}
